﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Game
{
    namespace BasicEntity
    {
        class Rotating : Entity
        {
            IDK.Vector3 mRotationAxis = new IDK.Vector3(0, 1, 0);
            float mRotationSpeed = 1;

            public Rotating(IDK.SceneNode node)
            {
                Body = new Body(node);
            }

            Body Body
            {
                get;
                set;
            }

            public override void Invalidate()
            {
                //
            }

            public override void OnUpdate(Events.ProcessSceneUpdate evnt)
            {
                Body.Rotate(IDK.Quaternion.Rotate(mRotationAxis, new IDK.Radian(mRotationSpeed * evnt.ElapsedTime)));
            }
        }
    }
}
